import { defineStore } from 'pinia'

export const useGlobalStore = defineStore('global', {
  state: () => {
    return {
        statusBarHeight: 0,
        navTop: 0,
        navHeight: 0,
        windowHeight: 0
    }
  },
  // could also be defined as
  // state: () => ({ count: 0 })
  actions: {
    initializeGlobal(...state) {
      this.statusBarHeight = state.statusBarHeight;
      this.navTop = state.navTop;
      this.navHeight = state.navHeight;
      this.windowHeight = state.windowHeight;
    },
  },
})